Skip to content

Conversation

slaren
Copy link
Member

@slaren slaren commented Oct 11, 2025

Remove an unnecessary call to cudaSetDevice during initialization. Calling this function will initialize the CUDA runtime for the device and allocate resources that may not be necessary if the device is not actually used.

Fixes #16509

@github-actions github-actions bot added Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning labels Oct 11, 2025
@slaren slaren merged commit 97870e6 into master Oct 11, 2025
69 checks passed
@slaren slaren deleted the sl/fix-cuda-init-leak branch October 11, 2025 11:02
yael-works pushed a commit to yael-works/llama.cpp that referenced this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: -dev CUDA0 uses 496MiB on device 1

3 participants